import { request } from '@/utils/request'

// 分页查询
export function get${entityName}ListByPage(data) {
    return request({
        url: '/${entityName?uncap_first}/getListByPage?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
        method: 'post',
        data: data
    })
}

// 通过id查询
export function get${entityName}ById(id) {
    return request({
        url: '/${entityName?uncap_first}/getById?id=' + id,
        method: 'get'
    })
}

// 新增
export function add${entityName}(data) {
    return request({
        url: '/${entityName?uncap_first}/add',
        method: 'post',
        data: data
    })
}

// 修改
export function update${entityName}(data) {
    return request({
        url: '/${entityName?uncap_first}/update',
        method: 'post',
        data: data
    })
}

// 删除
export function del${entityName}(id) {
    return request({
        url: '/${entityName?uncap_first}/delete?id=' + id,
        method: 'delete'
    })
}
